#include "tan_alloc.h"


void* Tan_malloc(tan_size_t size)
{
	void* alloc_ptr = 0;
	tan_assert(!(size > TAN_SIZE_T_MAX) ,"It is not allowed to request more than 4GB of memory space.");
	tan_assert(!(size < 0),"It is not allowed to apply for memory space less than 1 byte.");

	alloc_ptr = malloc(size);
	if (alloc_ptr)
	{
		memset(alloc_ptr, 0, size);
	}
	return alloc_ptr;
}

void* Tan_realloc(void* ptr, tan_size_t size)
{
	tan_assert(!(size > TAN_SIZE_T_MAX), "It is not reallowed to request more than 4GB of memory space.");
	tan_assert(!(size < 0), "It is not reallowed to apply for memory space less than 1 byte.");

	return realloc(ptr, size);
}
